﻿// Decompiled by AS3 Sorcerer 6.78
// www.buraks.com/as3sorcerer

//com.wdcgame.tile.model.LayerVO

package com.game.tile.model
{
    import base.BaseVO;
    
    import com.dusk.util.StringUtil;
    
    import flash.utils.Dictionary;

    public class LayerVO extends BaseVO
    {

        public var name:String;
        public var width:int;
        public var height:int;
        public var offsetx:int;
        public var offsety:int;
        public var type:String;
        public var properties:Object;
        public var visible:Boolean;
        public var opacity:Number;
        public var tileWidth:Number;
        public var tileHeight:Number;
        public var zSort:int;


        override public function buildFromXMLAttr(_arg_1:XML):void
        {
            var _local_4:* = null;
            super.buildFromXMLAttr(_arg_1);
            properties = new Dictionary();
            for each (var _local_3:XML in _arg_1.properties.property)
            {
                properties[String(_local_3.@name)] = String(_local_3.@value);
                _local_4 = _local_3.@type;
                if (StringUtil.trim(_local_4) != "")
                {
                    if (_local_4 == "float")
                    {
                        properties[String(_local_3.@name)] = Number(_local_3.@value);
                    }
                    else
                    {
                        if (_local_4 == "int")
                        {
                            properties[String(_local_3.@name)] = int(_local_3.@value);
                        }
                        else
                        {
                            if (_local_4 == "bool")
                            {
                                properties[String(_local_3.@name)] = false;
                                if (_local_3.@value == "true")
                                {
                                    properties[String(_local_3.@name)] = true;
                                }
                            }
                        }
                    }
                }
            }
            name = _arg_1.@name;
            width = _arg_1.@width;
            height = _arg_1.@height;
            if (_arg_1.attribute("visible"))
            {
                visible = !(_arg_1.@visible == "0");
            }
            var _local_2:String = _arg_1.@opacity;
            _local_2 = StringUtil.trim(_local_2);
            opacity = (_local_2 == "") ? 1 : Number(_local_2);
        }

        public function Destroy():void
        {
        }


    }
}//package com.wdcgame.tile.model

